package com.grunix.android.nfckeyboard;

import com.grunix.android.nfckeyboard.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.Toast;

public class NFCScan extends Activity {
		private LinearLayout layout;
		
		@Override
		protected void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			setContentView(R.layout.nfc_dialog);
			layout = (LinearLayout)findViewById(R.id.nfc_layout);
			layout.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {
					Toast.makeText(getApplicationContext(), R.string.nfc_dialog_toast, Toast.LENGTH_SHORT).show();
				}
			});
		}
	
		@Override
		public boolean onTouchEvent(MotionEvent event) {
			Toast.makeText(getApplicationContext(), "onTouchEvent", Toast.LENGTH_SHORT).show();
			finish();
			return true;
		}

		public void onScanButton(View v) {
			Toast.makeText(getApplicationContext(), "Scan NFC", Toast.LENGTH_SHORT).show();
			this.finish();
		}
		
		
		public void onExitButton(View v) {
			Toast.makeText(getApplicationContext(), "Exit NFC Dialog", Toast.LENGTH_SHORT).show();
			this.finish();
		}
		
}
